package com.ruoyi.project.channel.channelRate.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.channel.channelRate.mapper.ChannelRateMapper;
import com.ruoyi.project.channel.channelRate.domain.ChannelRate;
import com.ruoyi.project.channel.channelRate.service.IChannelRateService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 通道商费率 服务层实现
 * 
 * @author zero
 * @date 2019-05-13
 */
@Service
public class ChannelRateServiceImpl implements IChannelRateService 
{
	@Autowired
	private ChannelRateMapper channelRateMapper;

	/**
     * 查询通道商费率信息
     * 
     * @param rateId 通道商费率ID
     * @return 通道商费率信息
     */
    @Override
	public ChannelRate selectChannelRateById(Long rateId)
	{
	    return channelRateMapper.selectChannelRateById(rateId);
	}
	
	/**
     * 查询通道商费率列表
     * 
     * @param channelRate 通道商费率信息
     * @return 通道商费率集合
     */
	@Override
	public List<ChannelRate> selectChannelRateList(ChannelRate channelRate)
	{
	    return channelRateMapper.selectChannelRateList(channelRate);
	}
	
    /**
     * 新增通道商费率
     * 
     * @param channelRate 通道商费率信息
     * @return 结果
     */
	@Override
	public int insertChannelRate(ChannelRate channelRate)
	{
	    return channelRateMapper.insertChannelRate(channelRate);
	}
	
	/**
     * 修改通道商费率
     * 
     * @param channelRate 通道商费率信息
     * @return 结果
     */
	@Override
	public int updateChannelRate(ChannelRate channelRate)
	{
	    return channelRateMapper.updateChannelRate(channelRate);
	}

	/**
     * 删除通道商费率对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteChannelRateByIds(String ids)
	{
		return channelRateMapper.deleteChannelRateByIds(Convert.toStrArray(ids));
	}
	
}
